/*!*********************************************************************************
 * X2Engine Open Source Edition is a customer relationship management program developed by
 * X2 Engine, Inc. Copyright (C) 2011-2019 X2 Engine Inc.
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY X2ENGINE, X2ENGINE DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact X2Engine, Inc. P.O. Box 610121, Redwood City,
 * California 94061, USA. or at email address contact@x2engine.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2 Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2 Engine".
 **********************************************************************************/




@import "standards";

/*
fixed header disabled for mobile layout (should eventually be made sticky)
*/

$right-margin: 3px;
$left-margin: 3px;
@media (min-width: 658px) {
  .no-widgets .x2-gridview-fixed-top-bar-outer {
    padding-right: 21px;
  }
  .grid-view .mobile-dropdown-button {
    display: none !important;
  }
  .no-widgets .x2-gridview-fixed-top-bar-outer .x2-gridview-fixed-title {
    margin: 0 0px 0 $left-margin;
  }
  .x2-gridview-fixed-top-bar-outer .x2-gridview-fixed-title {
    margin: 0 6px 0 $left-margin;
    width: auto;
    @include border-radius(0);
  }
  .no-widgets .x2-gridview-fixed-top-bar-outer .x2grid-header-container {
    margin: 0 0px 0 $left-margin;
  }
  .x2-gridview-fixed-top-bar-outer {
    .x2grid-header-container {
      margin: 0 6px 0 $left-margin;
    }
    + .x2grid-body-container .x2grid-grips div {
      top: $gridViewCellHeight + 56px !important;
    }
    .x2-gridview-fixed-top-bar-inner {
      width: 100%;
      padding-right: calc(22% + 3px);
      padding-left: 9px;
      height: 0;
      box-sizing: border-box;
    }
    width: 100%;
    height: 0px;
    position: fixed;
    z-index: 800;
    left: 0;
    top: 47px;
    padding-left: 181px;
    padding-right: 44px;
    box-sizing: border-box;
  }
  .x2-gridview-body-with-fixed-header {
    padding-top: $gridViewCellHeight + 61px;
  }
}

@media (max-width: 801px) and (min-width: 658px) {
  .grid-view.fullscreen.show-mass-action-buttons .grid-view-summary-text {
    display: none;
  }
}

@media (max-width: 1040px) and (min-width: 658px) {
  .x2-gridview-fixed-top-bar-outer {
    .x2-gridview-fixed-title, .x2grid-header-container {
      margin: 0 -4px 0 $left-margin;
    }
  }
}

@media (max-width: 1040px) {
  .x2-gridview-fixed-top-bar-outer {
    .x2grid-header-container {
      margin: 0 0px 0 0px;
    }
    .x2-gridview-fixed-top-bar-inner {
      padding-right: 0;
    }
  }
}

@media (max-width: 370px) {
  .x2-gridview-top-pager {
    display: none !important;
  }
}

@media (max-width: 325px) {
  .grid-view-summary-text {
    display: none !important;
  }
}

@media (max-width: 657px) {
  div.x2-gridview-fixed-top-bar-outer {
    padding-left: 0px;
    left: -11px;
  }
  #actions-grid .page-title > h2, #users-grid .page-title > h2, #x2-gridview-page-title > h2 {
    display: block !important;
  }
  .grid-view .page-title {
    height: 36px;
    .summary {
      float: none;
    }
  }
  /* enables hiding of summary */
  .show-top-buttons.grid-view .page-title .summary {
    float: right;
  }
  ul.column-selector {
    position: absolute !important;
    top: 75px;
  }
  .x2-gridview-mass-action-buttons .more-drop-down-list {
    position: absolute !important;
  }
}
